/*
 * @Author: zheguo 3188606474@qq.com
 * @Date: 2024-04-19 18:56:01
 * @LastEditors: zheguo 3188606474@qq.com
 * @LastEditTime: 2024-04-24 21:02:17
 * @FilePath: \projectOne\myexpress\app\models\admin\admin.model.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
module.exports = (sequelize, Sequelize) => {

    // 用户表
    const admin = sequelize.define("admins", {
        username: {
            type: Sequelize.STRING,
            allowNull: false
        },
        password: {
            type: Sequelize.STRING,
            allowNull: false
        },
        identify: {
            type: Sequelize.STRING,
            allowNull: false
        },
        imgPath: {
            type: Sequelize.STRING,
            allowNull: false
        }
    }, {
        freezeTableName: true
        // 强制让模型名称等于表名称
    })
    return admin
}